/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.api.sale.param;
import com.gitee.easyopen.doc.annotation.ApiDocField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 销售订单表入参
 *
 * @author xiaolai
 * @email xiaolai@9dyun.cn
 * @date 2019-06-18 16:59:32
 */
@Data
public class OrderHeadParam  {
	private static final long serialVersionUID = 1L;
    /**
	 * 客户编码;来源于base_customer.customer_code
	 */
    @ApiDocField(description = "客户编码", required = true, example = "001")
    @NotBlank(message="客户编码不能为空")
    @Length(max=20, message="客户编码长度不能超过20个字符")
    private String customerCode;
    /**
	 * 客户名称;来源于base_customer.customer_name
	 */
    @ApiDocField(description = "客户名称", required = true, example = "张三")
    @NotBlank(message="客户名称不能为空")
    @Length(max=40, message="客户名称长度不能超过40个字符")
    private String customerName;

    /**
     * 预销售订单id;来源于sale_prob_head.id
     */
    @ApiDocField(description = "预销售订单id", required = true)
    @NotNull(message="预销售订单id不能为空")
    private Long probId;

    /**
     * 预订单编码;来源于sale_prob_head.prob_no
     */
    @ApiDocField(description = "预订单编码", required = true)
    @NotBlank(message="预订单编码不能为空")
    @Length(max=20, message="预订单编码长度不能超过20个字符")
    private String probNo;

    /**
     * 销售订单明细表
     */
    @ApiDocField(description = "销售订单明细表", elementClass = OrderLineParam.class)
    private List<OrderLineParam> orderLineEntityList;

}
